package com.lzh.mapper;

import com.lzh.pojo.CT;
import com.lzh.pojo.Teacher;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Set;

/**
 * @author reborn
 * @create 2020/5/18-22:28
 */
@Repository
public interface TeacherMapper {

//    查询全部教师
    List<Teacher> selectTeachers();


    //    根据id查询教师
    Teacher selectTeacherById(int id);

//    查找帐号是否重复
    Teacher selectZh(String zh);

    //    根据id查询教师
    List<Teacher> selectTeacherByIds(Set<Integer> ids);

    //    根据id查询教师
    List<Teacher> selectPerms(String perms);

    //    登录查询是否存在
    @Select("select * from teacher where zh=#{zh} and pwd=#{pwd}")
    Teacher selectTeacherZh(String zh,String pwd);

//    根据教师名字模糊查询
List<Teacher> selectTeaByName(String name);

    //删除
    int deleteTea(int id);

//    添加教师
    int insertTea(Teacher teacher);

//    更新教师
    int updateTeacher(Teacher teacher);




}
